import MovePlayerEvent from "./move_player.js";
runOnStartup(async runtime => {
    runtime.addEventListener("tick", () => tick())
    runtime.getLayout("MainLevel").addEventListener("afterlayoutstart", () => init())
});
function tick() {
}
function init() {
    SpwnPlayer.setPlayerPositionToPoint()
}
export default class SpwnPlayer{
 
    // 設置角色的出生點
    static setPlayerPositionToPoint(){
        const SpwnPoint =runtime.objects.PlayerSpwnPoint.getFirstInstance()
        MovePlayerEvent.playerMask.x=SpwnPoint.x
        MovePlayerEvent.playerMask.y=SpwnPoint.y
    }
}
